package com.tanhua.sso.controller;

import com.tanhua.common.service.PicUploadService;
import com.tanhua.common.vo.PicUploadResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * * @title: PicUploadController
 *
 * @Author Philcan
 * @Date: 2021/8/8 18:13
 * @Version 1.0
 */
@RestController
@RequestMapping("pic/upload")
public class PicUploadController {
    @Autowired
    private PicUploadService picUploadService;

    @PostMapping
    @ResponseBody
    public PicUploadResult result(@RequestParam("file") MultipartFile file) {
        return this.picUploadService.upload(file);
    }
}
